package com.fc.admin.api.feign;

import com.fc.admin.api.entity.SysOauthClientDetails;
import com.fc.common.core.constant.CommonConstants;
import com.fc.common.core.constant.SecurityConstants;
import com.fc.common.core.constant.ServiceNameConstants;
import com.fc.common.core.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @Description: 客户端信息表
 * @ClassName: RemoteClientDetailsService
 * @Author: weisn
 * @Date: 2022/12/20 9:26
 * @Version: 1.0
 */
@FeignClient(contextId = "remoteClientDetailsService", value = ServiceNameConstants.ADMIN_SERVICE)
public interface RemoteClientDetailsService {

    /**
     * 通过clientId 查询客户端信息
     * @param clientId 用户名
     * @return R
     */
    @GetMapping(value = "/client/getClientDetailsById/{clientId}", headers = SecurityConstants.HEADER_FROM_IN)
    R<SysOauthClientDetails> getClientDetailsById(@PathVariable(value = "clientId") String clientId);

    /**
     * 查询全部客户端
     * @return R
     */
    @GetMapping(value = "/client/list", headers = SecurityConstants.HEADER_FROM_IN)
    R<List<SysOauthClientDetails>> listClientDetails();

}
